package com.kugou.helloworld;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import static com.kugou.test.helper.TestHelper.*;

public class RemoteService extends Service {
    private long mStartTime;

    public class MyBinder extends IRemoteService.Stub {
        @Override
        public long getServiceRunTime() {
            return System.currentTimeMillis() - mStartTime;
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        print("RemoteService onBind");
        return new MyBinder();
    }

    @Override
    public void onCreate() {
        print("RemoteService onCreate");
        super.onCreate();
        mStartTime = System.currentTimeMillis();
    }
}
